Skip to content

Conversation

@proberts-cinesite
Copy link
Contributor

Multithread default bounds computation using tbb::parallel_reduce.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Cortex project's prevailing coding style and conventions.

@proberts-cinesite proberts-cinesite force-pushed the PrimitiveBoundUseParallelReduce branch from a4bd9d6 to d9d089f Compare February 16, 2023 21:23
@proberts-cinesite proberts-cinesite changed the base branch from main to RB-10.4 February 16, 2023 21:24
Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul, this provides a nice speedup in my tests. Do you fancy giving the same treatment to the PointsPrimitive::bound() override?

Comment on lines 90 to 92
for( const V3f
* it = range.begin(),
*const itEnd = range.end(); it != itEnd; ++it )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for( const V3f &point : range )

Now that range-for exists, I automatically assume that a for loop with pointer arithmetic in will contain some custom logic rather than just be visiting every element in the range.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@proberts-cinesite
Copy link
Contributor Author

I have given the same treatment to the PointsPrimitive::bound() override.

@johnhaddon johnhaddon force-pushed the PrimitiveBoundUseParallelReduce branch from ffaffa8 to 0953512 Compare March 2, 2023 12:46
@johnhaddon
Copy link
Member

Thanks Paul - I've squashed in the fixup and fixed the Changes.md conflict. Merging...

@johnhaddon johnhaddon merged commit 1e2ecfb into ImageEngine:RB-10.4 Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants